<!doctype html>
<title>Using setInterval</title>

<script>

window.setInterval(timer, 1000);

function timer()
{
  console.log("tick!");
}

</script>